﻿@model LaMalleAJeux.Models.Game
@using LaMalleAJeux.Helpers

@{
    ViewBag.Title = @Html.Localise("NewGame");
}

<h2>@Html.Localise("NewGame")</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@Html.Localise("Game")</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Duration)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Duration)
            @Html.ValidationMessageFor(model => model.Duration)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MaximumAge)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaximumAge)
            @Html.ValidationMessageFor(model => model.MaximumAge)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MinimumAge)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MinimumAge)
            @Html.ValidationMessageFor(model => model.MinimumAge)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MaximumPlayers)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaximumPlayers)
            @Html.ValidationMessageFor(model => model.MaximumPlayers)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MinimumPlayers)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MinimumPlayers)
            @Html.ValidationMessageFor(model => model.MinimumPlayers)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ReleaseDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ReleaseDate)
            @Html.ValidationMessageFor(model => model.ReleaseDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PictureUrl)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PictureUrl)
            @Html.ValidationMessageFor(model => model.PictureUrl)
        </div>       

        <div class="editor-label">
            @Html.LabelFor(model => model.IsVisible)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsVisible)
            @Html.ValidationMessageFor(model => model.IsVisible)
        </div>

        <p>
            <input type="submit" value="@Html.Localise("Create")" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink(@Html.Localise("BackToTheList"), "Index")
</div>
